package com.ruoyi.common.exception;

/**
 * 网站端自定义异常
 * @author yangz
 */
public class AuthTokenException extends RuntimeException {

    private static final long serialVersionUID=1L;

    private String msg;
    private int code=500;

    //构造
    public AuthTokenException(String errmsg){
        super(errmsg);
        this.msg=errmsg;
    }

    public AuthTokenException(String errmsg, Throwable e) {
        super(errmsg, e);
        this.msg = errmsg;
    }

    public AuthTokenException(String errmsg, int errno) {
        super(errmsg);
        this.msg = errmsg;
        this.code = errno;
    }

    public AuthTokenException(String errmsg, int errno, Throwable e) {
        super(errmsg, e);
        this.msg = errmsg;
        this.code = errno;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
